import React, { Component } from 'react'

import NavBar from './NavBar'
import NavBar2 from './NavBar2'

export default class App extends Component {
  render() {
    return (
      <div>
        <NavBar> 
          <span>left</span>
          <em>center</em>
          <a href="/#">right</a>
        </NavBar>

        {/*2. 通过数据的方式传递 */}
        <NavBar2 
          leftSlot={<span>left</span>} 
          centerSlot={<em>center</em>}  
          rightSlot={<a href="/#">right</a>}  
        />
      </div>
    )
  }
}
